GitHub Actions
GitHub Actionsのドキュメント - GitHub Docs
ne-sachirou/github-actions-playground: GitHub Actions playground
nektos/act: Run your GitHub Actions locally 🚀
github/local-action: A simple utility for running and debugging a GitHub Action locally
Rancher Desktop/Apple Silicon 上で
$ DOCKER_HOST="$(docker context ls | grep '*' | awk '{print $NF}')" act 云々 --container-architecture linux/amd64
ag -g '\.ya?ml$' | xargs -t -I{} -P $(nproc) command {} は何か結果が空になるので
git ls-files | grep -E '\.ya?ml$' | xargs -t -I{} -P $(nproc) command {} を使ふ
<del>( find . -name '*.yml' ; find . -name '*.yaml' ) | xargs -t -I{} -P $(nproc) command {} を使ふ</del>
lint
actionlint
actionlint playground
rhysd/actionlint: Static checker for GitHub Actions workflow files
$ actionlint
reviewdog/action-actionlint: run actionlint with reviewdog
zizmor
ghalint
lint-gha-reviewdog · Actions · GitHub Marketplace
ne-sachirou/lint-gha-reviewdog: GitHub Action for linting GitHub Actions files with actionlint, zizmor, and ghalint.
利用例
https://github.com/ne-sachirou/github-actions-playground/blob/main/.github/workflows/wf-lint-gha.yaml
https://github.com/ne-sachirou/github-actions-playground/actions/workflows/on-pull_request.yaml
ワークフローの再利用 - GitHub Docs
code:workflow-lint.yaml
"on":
workflow_call:
inputs:
?
secrets:
?
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- ?
code:on-push-main.yaml
"on":
push:
branches: main
jobs:
lint:
uses: ./.github/workflows/workflow-lint.yml
with:
?: ?
secrets:
?: ${{ secrets.? }}